package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.CrmResearchIntentModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by lusong on 2016/11/14.
 */
public interface CrmRearchIntentRepository extends JpaRepository<CrmResearchIntentModel,Integer>,JpaSpecificationExecutor<CrmResearchIntentModel> {

    @Query("select a from CrmResearchIntentModel a where a.permit =?1 and a.stage = ?2")
    public CrmResearchIntentModel getModelByPermitAndStage(String permit,String stage);
}
